﻿<UserControl
    x:Class="WinRTXamlToolkit.Sample.Views.CustomAppBarTestView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:WinRTXamlToolkit.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:Extensions="using:WinRTXamlToolkit.Controls.Extensions"
    mc:Ignorable="d"
    Margin="0,-140,0,0">

    <Grid
        >
        <controls:CustomAppBar
            x:Name="BottomAppBar"
            IsOpen="True">
            <StackPanel
                Orientation="Horizontal">
                <Button
                    Style="{StaticResource PlayAppBarButtonStyle}"/>
                <CheckBox
                    x:Name="IsLightDismissEnabledCheckBox"
                    Content="IsLightDismissEnabled"
                    VerticalAlignment="Center"
                    Checked="OnIsLightDismissEnabledCheckBoxChecked"
                    Unchecked="OnIsLightDismissEnabledCheckBoxUnchecked" />
            </StackPanel>
        </controls:CustomAppBar>
        <controls:CustomAppBar
            x:Name="TopAppBar"
            Height="140"
            CanDismiss="False"
            VerticalAlignment="Top">
            <StackPanel
                Orientation="Horizontal">
                <TextBlock
                    Text="CustomAppBar Test"
                    Style="{StaticResource PageHeaderTextStyle}" />
            </StackPanel>
        </controls:CustomAppBar>
        <controls:CustomAppBar
            x:Name="InnerTopAppBar"
            Margin="100,200"
            Height="100"
            VerticalAlignment="Top">
            <StackPanel
                Orientation="Horizontal">
                <TextBlock
                    Text="Inner CustomAppBar"
                    Style="{StaticResource PageSubheaderTextStyle}" />
            </StackPanel>
        </controls:CustomAppBar>
        <controls:CustomAppBar
            x:Name="InnerBottomAppBar"
            Margin="100,200"
            Height="100"
            VerticalAlignment="Bottom"
            Extensions:FrameworkElementExtensions.ClipToBounds="True">
            <StackPanel
                Orientation="Horizontal">
                <TextBlock
                    Text="Inner CustomAppBar with FrameworkElementExtensions.ClipToBounds=&quot;True&quot;"
                    Style="{StaticResource PageSubheaderTextStyle}" />
            </StackPanel>
        </controls:CustomAppBar>
        <controls:CustomAppBar
            x:Name="LeftAppBar"
            HorizontalAlignment="Left"
            VerticalAlignment="Stretch"
            CanOpenInSnappedView="False"
            Margin="0,140,0,100">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition
                        Height="Auto" />
                    <RowDefinition />
                </Grid.RowDefinitions>
                <Button
                    x:Name="LeftButton"
                    Click="OnLeftButtonClick"
                    AutomationProperties.Name="Left"
                    Style="{StaticResource OpenPaneAppBarButtonStyle}" />
                <controls:LayoutTransformControl
                    Grid.Row="1"
                    VerticalAlignment="Center"
                    HorizontalAlignment="Center">
                    <controls:LayoutTransformControl.Transform>
                        <RotateTransform
                            Angle="90" />
                    </controls:LayoutTransformControl.Transform>
                    <TextBlock
                        Text="CanOpenInSnappedView=&quot;False&quot;"
                        Style="{StaticResource SubheaderTextStyle}" />
                </controls:LayoutTransformControl>
            </Grid>
        </controls:CustomAppBar>
        <controls:CustomAppBar
            x:Name="RightAppBar"
            HorizontalAlignment="Right"
            VerticalAlignment="Stretch"
            Margin="0,140,0,100">
            <StackPanel>
                <Button
                    x:Name="RightButton"
                    Click="OnRightButtonClick"
                    AutomationProperties.Name="Right"
                    Style="{StaticResource ClosePaneAppBarButtonStyle}" />
            </StackPanel>
        </controls:CustomAppBar>
        <TextBlock
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            Style="{StaticResource SubheaderTextStyle}"
            TextWrapping="Wrap"
            Text="Test CustomAppBar by swiping from bottom, right-clicking or pressing WinKey+Z" />
    </Grid>
</UserControl>
